package com.neizhijiekou;

import java.util.function.Function;

public class FunctionTest {
    //  输入一个字符串，返回一个整形
    public void aaa(String str,Function<String,Integer> function){
        Integer apply = function.apply(str);
        System.out.println(apply);
    }

    public static void main(String[] args) {
        FunctionTest functionTest = new FunctionTest();
        functionTest.aaa("123", s -> Integer.parseInt(s)+1);

    }
}
